package cn.itheima.service.takedelivery;

import cn.itheima.domain.Promotion;
import cn.itheima.page.PageBean;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import javax.ws.rs.*;
import java.util.Date;

/**
 * Created by millions on 2017/7/7.
 */
public interface PromotionService {

    void save(Promotion model);

    Page<Promotion> queryPage(Pageable pageable);

    @GET
    @Produces({"application/xml","application/json"})
    @Path("/queryPromotionPage")
    PageBean<Promotion> queryPage(@QueryParam("rows")int rows,@QueryParam("page")int page);

    @GET
    @Produces({"application/xml","application/json"})
    @Path("/findPromotionById/{id}")
    Promotion findPromotionById(@PathParam("id")Integer id);

    void updateStatus(Date date);
}
